import App from './App'
import store from './store'
import httpServer from './store/ajax.js'
import navTo from './common/navTo.js'
import navLink from './common/navLink.js'
import mixin from './store/mixin.js'

const msg = (title, duration = 1500, mask = false, icon = 'none') => {
	//统一提示方便全局修改
	if (Boolean(title) === false) {
		return;
	}
	uni.showToast({
		title,
		duration,
		mask,
		icon
	});
}
Vue.prototype.$store = store;
Vue.prototype.$axios = httpServer;
Vue.prototype.$navTo = navTo;
Vue.prototype.$navBack = navLink.navBack;

Vue.mixin(mixin);
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif